﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;

namespace Agresso.Interface.Layer.Domain
{
    public class apodettext
    {
        public string break_flag = "";
        public string client = "";
        public decimal cur_amount = 0;
        public DateTime last_update = DateTime.Now;
        public int line_no =0;
        public long order_id = 0;
        public int sequence_no = 0;
        public string short_info = "";
        public string user_id = "";
        public string voucher_type = "";
        public long agrtid = 0;

        public apodettext() { }
        public apodettext(SqlDataReader rd)
        {
            break_flag = rd["break_flag"] is DBNull ? "" : rd["break_flag"].ToString();
            client = rd["client"] is DBNull ? "" : rd["client"].ToString();
            cur_amount = rd["cur_amount"] is DBNull ? 0 : Convert.ToDecimal(rd["cur_amount"]);
            last_update = rd["last_update"] is DBNull ? last_update : Convert.ToDateTime(rd["last_update"]);
            line_no = rd["line_no"] is DBNull ? 0 : Convert.ToInt32(rd["line_no"]);
            order_id = rd["order_id"] is DBNull ? 0 : Convert.ToInt64(rd["order_id"]);
            sequence_no = rd["sequence_no"] is DBNull ? 0 : Convert.ToInt32(rd["sequence_no"]);
            short_info = rd["short_info"] is DBNull ? "" : rd["short_info"].ToString();
            user_id = rd["user_id"] is DBNull ? "" : rd["user_id"].ToString();
            voucher_type = rd["voucher_type"] is DBNull ? "" : rd["voucher_type"].ToString();
            agrtid = rd["agrtid"] is DBNull ? 0 : Convert.ToInt64(rd["agrtid"]);

        }
    }
}
